import {get,post} from '../../utils/request.js'
const state = {
    //用来保存查询出来的栏目信息
    customers:[],
    total:0
}

const actions = {
    findAllCustomer(context,list){
        get('/account/pageQueryCustomerAccount',list).then(res =>{
          let response = res.data.list
          let total = res.data.total
          // console.log(response,total);
          context.commit('SET_CATEGORYS',response)
          context.commit('SET_TOTAL',total)
        })
      },
}

const mutations = {
  //修改state中的值
  SET_CATEGORYS(state,response){
    state.customers = response
  },
  SET_TOTAL(state,total){
    state.total = total
  }
}

export default {
  namespaced:true,
  state,
  actions,
  mutations
}
